home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / stacksiz.rea < prev    next >
Text File  |  1995-09-09  |  1KB  |  40 lines

  1. Short:    Processing stacksize in cli-scripts
  2. Author:   Thomas.Radtke@rz.uni-osnabrueck.de
  3. Uploader: Thomas.Radtke@rz.uni-osnabrueck.de
  4. Type:     util/batch
  5.  
  6.   This command lets you process the stacksize in cli-scripts. If the
  7. numeric argument given to it is lower than the actual stacksize, it
  8. will exit with value 5.
  9.  
  10.   Usage:
  11.  
  12.     syntax: stacksize n
  13. returncode: 5 if stacksize is lower than n, or if n is missing
  14.             0 if stacksize is higher or equal to n
  15.  
  16.   Example: You want to start a command in a batch file wich will use
  17. 20KB of stack. Normally you are using 4KB of stack, but maybe the user
  18. has raised the size to 300KB to start e.g. maple from the shell, you don't
  19. know. Setting the stack at this point to 20KB will be deadly for the
  20. one really starting maple after executing your batch file. To avoid
  21. such problems, you could now use the following script:
  22.  
  23. ; This example raises the stacksize only if it ranges below a critical
  24. ; value
  25.  
  26. stacksize 20480         ; request the return code
  27. if warn                 ; stack was lower than 20KB ?
  28.     stack 20480     ; yes, raise the stack
  29. endif
  30.  
  31.   Installation: Just move or copy bin/stacksize anywhere in your path,
  32. e.g. cp bin/stacksize c:
  33.  
  34.   The source can be found in the src directory.
  35.  
  36.   Legal: stacksize is freeware, you can redistribute the archive as
  37. long as the files 'stacksize' and 'stacksize.readme' are intact.
  38.  
  39. Thomas
  40.